###
#Texas Hold'em EKG plugin-connector
#EKG: (http://ekg.chmurka.net/)
#developed by fox (slawek@rozbicki.eu)
#source: https://code.google.com/p/texas-holdem-ekg

import ekg
import string
from parser import Parser
from table import *
from deck import Deck
from dealer import Dealer

t = Table(Deck())

pa = Parser(t)
pap = pa.ProcessMsg
    
def init():
	ekg.printf("generic", "Uruchomiono Texas-Holdem plugin: https://code.google.com/p/texas-holdem-ekg")
def deinit():
	ekg.printf("generic", "wylaczono Texas-Holdem plugin.")
def handle_msg(uin, name, msgclass, text, time, secure):
	if text[0] == "!":
		#cmd = "/msg " + `uin` + " %s" % joke()
		pap(uin, name, text)
def handle_msg_own(rcpts, text):
	if text[:0] == "!":
		#cmd = "/msg " + `rcpts` + " %s" % joke()
		pap(uin, name, text)
    
